package com.qf.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

/**
 * 用于对外返回数据的实体类
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
public class ResultData<T> {
    //请求响应码
    private Integer code;
    //响应的信息
    private String msg;
    //响应数据
    private T data;

    /**
     * 响应码常量
     */
    public static interface Code{
        Integer CODE_SUCC = 200;
        Integer CODE_ERROR = 300;
    }
}
